package com.liangtian.mdm.material.service;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import com.github.pagehelper.PageInfo;
import com.liangtian.mdm.material.model.WlLbmb;

public interface WlLbmbService {

    @SuppressWarnings("rawtypes")
    public PageInfo getWlLbmbListByCond(Map<String, Object> map);

    public WlLbmb getWlLbmbById(WlLbmb wlmb);

    /**
     * 查找某小类下的所有有效模板数据
     *
     * @param lbbm 物料类别编码
     * @return
     * @author jiangyh
     * @date 2016-10-24
     */
    public List<WlLbmb> getAllValidWlLbmbByLbbm(String lbbm);

    @SuppressWarnings("rawtypes")
    public PageInfo getWlLbmbListByCondByAdd(Map<String, Object> map);

    public int getWlLbmbListCountByCond(WlLbmb lbmb);

    public int insertWlLbmb(WlLbmb lbmb);

    public int getCountWlLbmbByCond(WlLbmb lbmb);

    public void updateWlLbmb(WlLbmb lbmb);

    public String copyWlLbmb(Map<String, Object> map);

    @SuppressWarnings("rawtypes")
    public PageInfo getWlLbmbById(Map<String, Object> map);

    public void insertWlLbmbUpdateByMap(Map<String, Object> map);

    /**
     * 导入物料模板特征量取值
     *
     * @param file
     * @param fileName
     * @return
     * @author jyh
     * @date 2017-04-11
     */
    public Map<String, Object> importWllbmbData(InputStream inputStream);

    /**
     * 根据条件修改物料类别模板
     *
     * @param cond
     * @return
     * @author jyh
     * @date 2017-04-13
     */
    public int updateWlLbmbByCond(Map<String, Object> cond);

    /**
     * 根据条件批量删除物料类别模板
     *
     * @param cond
     * @return
     * @author jyh
     * @date 2017-07-20
     */
    public int deleteWlLbmbByCond(Map<String, Object> cond);

    /**
     * 删除类别时 查询类别下的模板 做删除模板、特征量、取值的准备工作
     *
     * @param cond
     * @return
     * @author ly
     * @date 2017-11-08
     */
    public List<WlLbmb> getListByDelLbGuanLian(Map<String, Object> cond);

    /**
     * 删除类别时 查询类别下的模板
     *
     * @param cond
     * @return
     * @author ly
     * @date 2017-11-08
     */
    public int getCountdelWllbByMbBm(Map<String, Object> cond);

    //物料模板导出
    public void exportWlLbMb(List<WlLbmb> list, HttpServletResponse response);

    @SuppressWarnings("rawtypes")
    public PageInfo getWlLbmbListByCond2(Map<String, Object> map);
}
